#include "dialog.h"

MyDialog::MyDialog(wxWindow *parent)
: wxDialog(parent, -1, _T("我的对话框")){
	SetAutoLayout(TRUE);

	wxLayoutConstraints *layout = new wxLayoutConstraints();

	layout->top.SameAs(this, wxTop, 10);
	layout->centreX.SameAs(this, wxCentreX);
	layout->width.AsIs();
	layout->height.AsIs();

	wxStaticText *_pText = new wxStaticText(this, -1, _T("TXTXTXTXT"), wxPoint(-1, -1), wxDefaultSize, wxALIGN_CENTER);
	_pText->SetConstraints(layout);

	layout = new wxLayoutConstraints();
	layout->top.Below(_pText, 20);
	layout->centreX.SameAs(this, wxCentreX);
	layout->width.PercentOf(this, wxWidth, 80);
	layout->height.AsIs();
// 
	wxButton *_pOkBtn = new wxButton(this, wxID_OK, "OK", wxPoint(-1, -1));
	_pOkBtn->SetConstraints(layout);

	Layout();
}

